Telegram Group & Telegram Channel
Note #13: go doc with colors

Если вы используете go doc, для быстрого доступа к go документации, есть интересная идея как это все разукрасить:

func main() {
args := []string{"doc"}
args = append(args, os.Args[1:]...)
cmd := exec.Command("go", args...)
cmd.Env = os.Environ()

output, _ := cmd.CombinedOutput()

stdout := colorable.NewColorableStdout()
err := quick.Highlight(stdout, string(output),
"go", "terminal256", style)

stdout.Write([]byte("\033[0m\n"))
}

Код очень простой и не странно, что принимает те же параметры что и go doc :trollface:, как описал автор :)

Link: https://github.com/inancgumus/godocc

Установить можно так:
go get -u github.com/inancgumus/godocc

GODOCC_STYLE=monokai godocc time Unix



tg-me.com/golang_for_two/37
Create:
Last Update:

Note #13: go doc with colors

Если вы используете go doc, для быстрого доступа к go документации, есть интересная идея как это все разукрасить:

func main() {
args := []string{"doc"}
args = append(args, os.Args[1:]...)
cmd := exec.Command("go", args...)
cmd.Env = os.Environ()

output, _ := cmd.CombinedOutput()

stdout := colorable.NewColorableStdout()
err := quick.Highlight(stdout, string(output),
"go", "terminal256", style)

stdout.Write([]byte("\033[0m\n"))
}

Код очень простой и не странно, что принимает те же параметры что и go doc :trollface:, как описал автор :)

Link: https://github.com/inancgumus/godocc

Установить можно так:
go get -u github.com/inancgumus/godocc

GODOCC_STYLE=monokai godocc time Unix

BY 🇺🇦 Go for two :)




Share with your friend now:
tg-me.com/golang_for_two/37

View MORE
Open in Telegram


🇺🇦 Go на двоих Telegram | DID YOU KNOW?

Date: |

Newly uncovered hack campaign in Telegram

The campaign, which security firm Check Point has named Rampant Kitten, comprises two main components, one for Windows and the other for Android. Rampant Kitten’s objective is to steal Telegram messages, passwords, and two-factor authentication codes sent by SMS and then also take screenshots and record sounds within earshot of an infected phone, the researchers said in a post published on Friday.

🇺🇦 Go на двоих from sg


Telegram 🇺🇦 Go for two :)
FROM USA